<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');


require_once('custom/modules/Documents/SugarWidgets/SugarWidgetSubPanelCreateRevisionButton.php');
require_once('custom/modules/Documents/SugarWidgets/SugarWidgetSubPanelDownloadRevisionButton.php');
require_once('custom/modules/Documents/SugarWidgets/SugarWidgetSubPanelTopCreateDocumentButton.php');
$subpanel_layout = array(
	'top_buttons' => array(
		array('widget_class' => 'SubPanelTopCreateDocumentButton',),
		array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Documents','field_to_name_array'=>array('document_revision_id'=>'REL_ATTRIBUTE_document_revision_id')),
	),

	'where' => '',

	'list_fields'=> array(
                'download_latest' => array(
                        'widget_class' => 'SubPanelDownloadRevisionButton',
                        'width' => '5%',
                        'default' => true,
                ),
		'create_revision' => array(
			'widget_class' => 'SubPanelCreateRevisionButton',
			'width' => '5%',
			'default' => true,
		),
		'document_name'=> array(
			'name' => 'document_name',
			'vname' => 'LBL_LIST_DOCUMENT_NAME',
			'widget_class' => 'SubPanelDetailViewLink',
			'width' => '30%',
		),
		'template_type' => array(
			'name' => 'template_type',
			'vname' => 'LBL_TEMPLATE_TYPE',
			'width' => '30%',
		),
		'latest_rev_for_task' => array(
			'name' => 'latest_rev_for_task',
			'vname' => 'LBL_LAST_REV_FOR_TASK',
		),
		'edit_button'=>array(
			'vname' => 'LBL_EDIT_BUTTON',
			'widget_class' => 'SubPanelEditButton',
		 	'module' => 'Documents',
			'width' => '5%',
		),
		'remove_button'=>array(
			'vname' => 'LBL_REMOVE',
			'widget_class' => 'SubPanelRemoveButton',
		 	'module' => 'Documents',
			'width' => '5%',
		),
                'document_revision_id' => array(
                        'usage' => 'query_only',
                ),	
	),
);
?>
